package com.jerem.gwt.bredgolf.server;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class JoueurDTO {

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key id;
	
	@Persistent
	private String nom;
	@Persistent
	private String prenom;
	@Persistent
	private String email;
	@Persistent
	private float indexCompet;
	@Persistent
	private float indexAmical;
	@Persistent
	private Date createDate;

	public JoueurDTO() {
		this.createDate = new Date();
	}

	public JoueurDTO(String nom, String prenom, String email, float indexCompet, float indexAmical) {
		this();
		this.nom = nom;
		this.prenom = prenom;
		this.email = email;
		this.indexCompet = indexCompet;
		this.indexAmical = indexAmical;
	}

	public Key getId() {
		return id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public float getIndexCompet() {
		return indexCompet;
	}

	public void setIndexCompet(float indexCompet) {
		this.indexCompet = indexCompet;
	}

	public float getIndexAmical() {
		return indexAmical;
	}

	public void setIndexAmical(float indexAmical) {
		this.indexAmical = indexAmical;
	}

	public Date getCreateDate() {
		return createDate;
	}

}